package com.netease.c;

import java.text.DateFormat;
import java.text.FieldPosition;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;

public class d extends DateFormat
{
  private static d a = null;
  private static final long serialVersionUID = 1L;

  public static DateFormat a()
  {
    if (a == null)
      a = new d();
    return a;
  }

  public StringBuffer format(Date paramDate, StringBuffer paramStringBuffer, FieldPosition paramFieldPosition)
  {
    String str = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(paramDate);
    return paramStringBuffer.append(str.substring(0, -2 + str.length())).append(':').append(str.substring(-2 + str.length()));
  }

  public Date parse(String paramString, ParsePosition paramParsePosition)
  {
    int i = paramParsePosition.getIndex();
    Calendar localCalendar = Calendar.getInstance();
    localCalendar.clear();
    int j = paramString.length() - i;
    if ((j != 4) && (j != 7) && (j != 10) && (j != 17) && (j != 20) && (j < 22))
      throw new IllegalArgumentException("");
    int k = 1;
    int m = 4;
    int n = 0;
    int i1 = 0;
    int i2 = 0;
    int i3 = 0;
    int i4 = 0;
    int i5 = 0;
    int i6 = 0;
    int i7 = 1;
    int i8 = 1;
    int i9 = 1900;
    int i10 = 0;
    int i11;
    int i20;
    int i21;
    int i22;
    int i23;
    int i24;
    int i25;
    int i26;
    int i27;
    int i28;
    label264: int i12;
    int i16;
    int i13;
    int i15;
    int i14;
    int i18;
    int i17;
    if (n < j)
    {
      i11 = n + 1;
      char c = paramString.charAt(n);
      if (!Character.isDigit(c))
        throw new IllegalArgumentException(Integer.toString(i11 - 1));
      i20 = i10 * 10 + (c - '0');
      if (i11 == m)
        switch (i1)
        {
        default:
          i21 = i9;
          i22 = i8;
          i23 = i7;
          i24 = i6;
          i25 = i5;
          i26 = i4;
          i27 = i3;
          i28 = i2;
          if (i11 != j)
            break;
          i12 = i28;
          i16 = i27;
          i13 = i26;
          i15 = i25;
          i14 = i24;
          i18 = i23;
          i17 = i22;
        case 0:
        case 1:
        case 2:
        case 3:
        case 4:
        case 5:
        case 6:
        case 7:
        case 8:
        }
    }
    for (int i19 = i21; ; i19 = i9)
    {
      paramParsePosition.setIndex(i11);
      StringBuilder localStringBuilder = new StringBuilder().append("GMT+").append(i16).append(":");
      Object localObject;
      label362: int i32;
      int i35;
      int i36;
      int i34;
      if (i12 < 10)
      {
        localObject = "0" + i12;
        localCalendar.setTimeZone(TimeZone.getTimeZone(localObject));
        localCalendar.set(1, i19);
        localCalendar.set(2, i17 - 1);
        localCalendar.set(5, i18);
        localCalendar.set(11, i14);
        localCalendar.set(12, i15);
        localCalendar.set(13, i13);
        return localCalendar.getTime();
        i22 = i8;
        i21 = i20;
        i23 = i7;
        i24 = i6;
        i25 = i5;
        i26 = i4;
        i27 = i3;
        i28 = i2;
        break label264;
        i23 = i7;
        i21 = i9;
        i24 = i6;
        i22 = i20;
        i25 = i5;
        i26 = i4;
        i27 = i3;
        i28 = i2;
        break label264;
        i24 = i6;
        i21 = i9;
        i25 = i5;
        i22 = i8;
        i23 = i20;
        i26 = i4;
        i27 = i3;
        i28 = i2;
        break label264;
        i25 = i5;
        i21 = i9;
        i26 = i4;
        i22 = i8;
        i23 = i7;
        i27 = i3;
        i28 = i2;
        i24 = i20;
        break label264;
        i26 = i4;
        i21 = i9;
        i22 = i8;
        i27 = i3;
        i23 = i7;
        i28 = i2;
        i24 = i6;
        i25 = i20;
        break label264;
        i27 = i3;
        i21 = i9;
        i22 = i8;
        i28 = i2;
        i23 = i7;
        i24 = i6;
        i25 = i5;
        i26 = i20;
        break label264;
        i21 = i9;
        i22 = i8;
        i23 = i7;
        i24 = i6;
        i25 = i5;
        i26 = i4;
        i27 = i3;
        i28 = i2;
        break label264;
        int i58 = k * i20;
        i21 = i9;
        i22 = i8;
        i23 = i7;
        i24 = i6;
        i25 = i5;
        i26 = i4;
        i27 = i58;
        i28 = i2;
        break label264;
        i21 = i9;
        i22 = i8;
        i23 = i7;
        i24 = i6;
        i25 = i5;
        i26 = i4;
        i27 = i3;
        i28 = i20;
        break label264;
        switch (i1)
        {
        default:
          i32 = m;
          i35 = k;
          i36 = i1;
          i34 = i11;
        case 0:
        case 1:
        case 2:
        case 3:
        case 7:
        case 4:
        case 5:
        case 6:
        }
      }
      while (true)
      {
        int i37 = i36 + 1;
        k = i35;
        i2 = i28;
        i3 = i27;
        i4 = i26;
        i5 = i25;
        i6 = i24;
        i7 = i23;
        i8 = i22;
        i9 = i21;
        i10 = 0;
        int i38 = i34;
        i1 = i37;
        m = i32;
        n = i38;
        break;
        int i55 = i11 + 1;
        if (paramString.charAt(i11) != '-')
        {
          i35 = k;
          int i57 = m;
          i36 = i1;
          i34 = i55;
          i32 = i57;
          continue;
        }
        int i56 = i55 + 2;
        i35 = k;
        i36 = i1;
        i34 = i55;
        i32 = i56;
        continue;
        int i52 = i11 + 1;
        if (paramString.charAt(i11) != 'T')
        {
          i35 = k;
          int i54 = m;
          i36 = i1;
          i34 = i52;
          i32 = i54;
          continue;
        }
        int i53 = i52 + 2;
        i35 = k;
        i36 = i1;
        i34 = i52;
        i32 = i53;
        continue;
        int i49 = i11 + 1;
        if (paramString.charAt(i11) != ':')
        {
          i35 = k;
          int i51 = m;
          i36 = i1;
          i34 = i49;
          i32 = i51;
          continue;
        }
        int i50 = i49 + 2;
        i35 = k;
        i36 = i1;
        i34 = i49;
        i32 = i50;
        continue;
        int i29 = i11 + 1;
        int i46 = paramString.charAt(i11);
        if (i46 == 58)
        {
          i32 = i29 + 2;
          i36 = i1;
          i34 = i29;
          i35 = k;
          continue;
        }
        if ((i46 == 43) || (i46 == 45))
        {
          if (i46 == 45);
          for (int i47 = -1; ; i47 = 1)
          {
            int i48 = i1 + 2;
            i32 = i29 + 2;
            i34 = i29;
            i35 = i47;
            i36 = i48;
            break;
          }
        }
        if (i46 == 90)
        {
          i32 = m;
          i36 = i1;
          i34 = i29;
          i35 = k;
          continue;
          int i39 = i11 + 1;
          int i40 = paramString.charAt(i11);
          if (i40 == 46)
          {
            m = i39;
            do
              m++;
            while (Character.isDigit(paramString.charAt(m)));
          }
          do
          {
            i35 = k;
            int i45 = m;
            i36 = i1;
            i34 = i39;
            i32 = i45;
            break;
            if ((i40 != 43) && (i40 != 45))
              continue;
            if (i40 == 45);
            for (int i41 = -1; ; i41 = 1)
            {
              int i42 = i1 + 1;
              int i43 = i39 + 2;
              i34 = i39;
              i32 = i43;
              i35 = i41;
              i36 = i42;
              break;
            }
          }
          while (i40 != 90);
          i35 = k;
          int i44 = m;
          i36 = i1;
          i34 = i39;
          i32 = i44;
          continue;
          i29 = i11 + 1;
          int i30 = paramString.charAt(i11);
          if ((i30 == 43) || (i30 == 45))
          {
            if (i30 == 45);
            for (int i31 = -1; ; i31 = 1)
            {
              i32 = i29 + 2;
              int i33 = i1;
              i34 = i29;
              i35 = i31;
              i36 = i33;
              break;
            }
          }
          if (i30 == 90)
          {
            i32 = m;
            i36 = i1;
            i34 = i29;
            i35 = k;
            continue;
            localObject = Integer.valueOf(i12);
            break label362;
          }
        }
        i32 = m;
        i36 = i1;
        i34 = i29;
        i35 = k;
      }
      i10 = i20;
      n = i11;
      break;
      i11 = n;
      i12 = i2;
      i13 = i4;
      i14 = i6;
      i15 = i5;
      i16 = i3;
      i17 = i8;
      i18 = i7;
    }
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.c.d
 * JD-Core Version:    0.6.0
 */